Conversation
|
Currently build stuck at npm build phase, don't know why :( |
|
that's likely #353709 |
|
I think this is quite interesting, but I don't see what the benefit is over using the pre-built archives. @onny maybe you can explain a bit what your motivation is? |
building from source has the benefits that you can easily patch things or include important security fixes or try feature branches. |
|
i also did this for invoiceplane and it is far more transparent and reproduceable with more checksums and stuff https://github.com/NixOS/nixpkgs/pull/353783/files |
|
You need to be aware that the release archive is not the same as just the sources plus dependencies plus npm build. It should be doable to reproduce it mostly, but I fear they might drift apart unnoticed in the future leading to problems down the road. |
|
My personal stance on this is that the xz incident has taught us basically that building from sources is always desirable.
Can you elaborate on what you mean with mostly? |
The release process calls https://github.com/nextcloud/server/blob/master/core/Command/Integrity/SignCore.php and since those are private keys we will never be able to replicate the signature as in the release archive.
Yes, but it could result in quite fatal ones. For example if a new app is added an shipped, but we don't notice it and something important relies on it, then we might break instances completely. I agree it's "just" a bug, but nevertheless something to consider. The release script is not public and I'm not sure if it is possible to fully understand everything it does without seeing it yourself. Maybe comparing the archive and the derivation is easy enough to eventually figure out everything that has to be done in the derivation, but that will be annoying work. |
|
Using diffoscope might be enough to reproduce the entire build process without having to rely on guessing or private information. I might give this a shot some day, maybe upstream could make use of it in some capacity as well ;) |
That's fair. I wouldn't want to diverge from what upstream recommends, to me the risk of subtle runtime-only issues is too high in this case. My point was mainly that this is a desirable property and I wanted to understand the reasoning against it, so thanks for elaborating.
I'd expect that to help with making a good call here, so this would be highly appreciated. Thanks! |
|
So should we eventually also build all apps from the store from source? This would mean a lot of maintenance work and would slow down updates a lot. |
|
For me |
|
I just started looking into this again and was able to make some great progress. |
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.